home *** CD-ROM | disk | FTP | other *** search
- #ifndef _SICTRL_H
- #define _SICTRL_H
-
- #ifndef _SITYPES_H
- # include <sitypes.h>
- #endif
- #ifndef _SIDEFS_H
- # include <sidefs.h>
- #endif
-
- typedef struct _siproc_t /* GUI 部品構造体 */
- {
- struct _siproc_t *next;
- CONST char *name; /* 名前 */
- int typ; /* 種別 */
- PTR_T (*constFunc)(); /* 作成関数 */
- int (*destFunc)(); /* 破壊関数 */
- int (*execFunc)(); /* 実行関数 */
- } SIPROC_T;
-
- typedef struct _siobj_t
- {
- struct _siobj_t *next, *prev;
- struct _siobj_t *parent, *child;
- CONST char *name;
- int typ; /* 種別 */
- SIPROC_T *proc; /* 部品データ */
- unsigned int att; /* 属性 */
- unsigned int stt; /* 状態 */
- void *para;
- char dat[1]; /* データ */
- } SIOBJ_T;
-
- typedef struct
- {
- RECTANGLE_T box; /* 基準座標と大きさ */
- POINT_T hp; /* 物理座標 */
- } SIORDER_T;
-
-
- typedef struct
- {
- RECTANGLE_T fr;
- int fil; /* 塗りつぶし */
- COLOR_T col; /* 色 */
- } SIRECT_T;
-
-
- #define SITYP_DMY (0)
- #define SITYP_ORDER (1)
- #define SITYP_RECT (11) /* 矩形 */
-
- typedef struct
- {
- SIPROC_T *topProc;
- SIOBJ_T *topObj;
-
- CONST char *errMsg;
- char errMsgBuf[512];
-
- } SICTRL_T;
-
- extern SICTRL_T SiCtrl; /* GUI 制御用 */
-
- #define SIOPEN_MODE_CHILD (0)
- #define SIOPEN_MODE_BROTHER (1)
-
- #define SISTT_OFF (0)
- #define SISTT_SLEEP (1)
- #define SISTT_ACTIVE (2)
-
- /*----------------------------------------------------------------------*/
- #define SIOBJ_CONST(_proc) (((_proc)->constFunc)())
- #define SIOBJ_DEST(_proc,_obj) (((_proc)->destFunc)((_obj)))
- #define SIOBJ_EXEC(_proc,_obj) (((_proc)->execFunc)((_obj)))
-
- /*----------------------------------------------------------------------*/
-
- /* "si_010.c" ------------------------------------------------------*/
- extern int SI_init(void);
- extern void SI_term(void);
-
- /* "si_020.c" ------------------------------------------------------*/
- extern SIPROC_T *SI_makeProc( PTR_T (*constFunc)(), int (*destFunc)(), int (*execFunc)());
-
- /* "si_030.c" ------------------------------------------------------*/
- #define SI_LINKMODE_NEXT (1)
- #define SI_LINKMODE_PREV (2)
- #define SI_LINKMODE_CHILD (3)
- #define SI_LINKMODE_PARENT (4)
- #define SI_LINKMODE_LAST (5)
- #define SI_LINKMODE_TOP (6)
-
- extern int SI_linkObj( int mode, SIOBJ_T **basObj, SIOBJ_T *newObj );
-
- #endif
-